<template>
    <div>
        <Table
            class="margin-15"
            :columns="columns"
            :data="dataList"
            border></Table>
    </div>
</template>

<script>
    export default {
        props:['dataList','costtype'],
        data() {
            return {
                
            }
        },
        computed:{
            columns(){
                return [
                    {
                        title: "费用明细",
                        render:(h,{row})=>{
                            return <div>{row.costName}</div>
                        }
                    },
                    {
                        title: "预估金额",
                        render:(h,{row})=>{
                            if(this.costtype == 'calcul'){
                                return <div>{row.estimatedCost}{row.currency}</div>
                            }else{
                                return <div>{row.cost}{row.currency}</div>
                            }
                        }
                    },
                ]
            }
        }
    }
</script>